/**
 * Project Name:gc_sms_hss
 * File Name:EmployeeStatusDaoImpl.java
 * Package Name:com.clps.dev.sms.dao.sm.impl
 * Copyright (c) 2018, erwin.wang@clpsglobal.com All Rights Reserved.
 *
 */
package com.clps.dev.sms.dao.sm.impl;

import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;
import com.clps.dev.sms.common.dao.impl.BaseDaoImpl;
import com.clps.dev.sms.dao.sm.EmployeeStatusDao;
import com.clps.dev.sms.entity.sm.EmployeeStatus;

/**
 * ClassName: EmployeeStatusDaoImpl <br/>
 * Description: EmployeeStatusDaoImpl  实现类
 *
 * @author erwin.wang
 * @version V1.0
 * @since JDK 1.8
 * @date 2018-12-05 11:21:28
 */
@Repository
public class EmployeeStatusDaoImpl extends BaseDaoImpl<EmployeeStatus> implements EmployeeStatusDao {

	
	
	/**
	 * Creates a new instance of EmployeeStatusDaoImpl.
	 */
	public EmployeeStatusDaoImpl() {
		super(EmployeeStatus.class);
	}

	/**
	 * @see com.clps.dev.sms.dao.sm.EmployeeStatusDao#verifyUniqueByESName()
	 */
	@Override
	public Integer verifyUniqueByESName(String esName) {
		DetachedCriteria dc = DetachedCriteria.forClass(EmployeeStatus.class,"es");
		dc.add(Restrictions.eq("es.employeeStatusName", esName));
		Integer resultId = this.findCount(dc);
		return resultId;
	}

}
